﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SqlMiM.Common.ViewModel;
using SqlMiM.Common;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using MvvmFoundation.Wpf;

namespace SqlMiM.ViewModel
{
    public class PluginViewModel : ObservableObject
    {
        private IPlugin plugin;
        private bool needsSave;

        public bool NeedsSave
        {
            get { return needsSave; }
            set
            {
                needsSave = value;
                this.RaisePropertyChanged("NeedsSave");
            }
        }

        public IPlugin Plugin
        {
            get { return plugin; }
            set
            {
                plugin = value;
                this.RaisePropertyChanged("Plugin");
            }
        }

        public PluginViewModel(IPlugin plugin)
        {
            this.Plugin = plugin;
            this.NeedsSave = false;
        }


        public UserControl Display
        {
            get
            {
                return this.Plugin.Display;
            }
        }

        public String Name
        {
            get
            {
                return this.Plugin.Name;
            }
        }

        public String Description
        {
            get
            {
                return this.Plugin.Description;
            }
        }

        public Key Key
        {
            get
            {
                return this.Plugin.Key;
            }
        }

        public ImageSource Icon
        {
            get
            {
                return this.Plugin.Icon;
            }
        }

        public int Index
        {
            get
            {
                return this.Plugin.Index;
            }
        }

       
        public IPluginGroup Group
        {
            get
            {
                return this.Plugin.Group;
            }
        }




    }
}
